package string;
/** boolean startsWith(String s) 开始    boolean endsWith(String s) 结束 */
public class StarsWithDemo {
    public static void main(String[] args) {
        String str = "thinking in java";//java编程思想(java经典书---工具书)
        boolean starts = str.startsWith("think");//判断str是否以think开头的
        System.out.println(starts);//true
        boolean ends = str.endsWith(".pug");//判断str是否以.pug结尾的
        System.out.println(ends);//false
    }
}
